import Vue from "vue";
import Router from "vue-router";
import HomeContainer from "../components/tabbar/HomeContainer";
import MemberContainer from "../components/tabbar/MemberContainer";
import ShopcarContainer from "../components/tabbar/ShopcarContainer";
import SerchContainer from "../components/tabbar/SerchContainer";
import NewsList from "../components/news/NewsList";
import NewsInfo from "../components/news/NewsInfo";
import photoList from "../components/photos/photoList";
import photoInfo from "../components/photos/photoInfo";

Vue.use(Router);

export default new Router({
  routes: [
    { path: "/", redirect: "/Home" },
    { path: "/Home", component: HomeContainer },
    { path: "/Member", component: MemberContainer },
    { path: "/Shopcar", component: ShopcarContainer },
    { path: "/Search", component: SerchContainer },
    { path: "/Home/newsList", component: NewsList },
    { path: "/Home/newsList/:id", component: NewsInfo },
    { path: "/Home/photoList", component: photoList },
    { path: "/Home/photoinfo/:id", component: photoInfo }
    // { path: "*", redirect: "/Home" }
  ],
  linkActiveClass: "mui-active" //覆盖路由高亮的类
  // mode: "history"
});
